Resize mode property

Last post 07-13-2009, 2:37 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  07-11-2009, 6:14 AM 53906

    Resize mode property

    Hi,
     
    We wants to expand the CuteEditor control horizontally. Using 'Resize mode' property, we are able to expand vertically but not horizontally.
     So Is there any property to do this. We used all the values of 'Resize mode' property. But we didn't get the solution.
     
    Thanks,
    Rajmohan
  •  07-13-2009, 2:37 AM 53920 in reply to 53906

    Re: Resize mode property

    Hi rajmohanp,
     
    Try this way
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5.   
    6. <script runat="server">   
    7.     protected override void OnLoad(EventArgs e)   
    8.     {   
    9.         editor1.ResizeMode = CuteEditor.EditorResizeMode.AutoAdjust;   
    10.         base.OnLoad(e);   
    11.     }   
    12.       
    13. </script>   
    14. <script type="text/javascript">   
    15. setInterval("refreshTime()",1000);   
    16.   
    17. function refreshTime()   
    18. {   
    19. var editor=document.getElementById('<%= editor1.ClientID%>');   
    20. var w=editor.GetDocument().body.scrollWidth;   
    21. if(w<760)w=760;   
    22. editor.style.width=w+10+"px";   
    23. }   
    24. </script>   
    25. <html xmlns="http://www.w3.org/1999/xhtml">   
    26. <head runat="server">   
    27.     <title>Untitled Page</title>   
    28. </head>   
    29. <body>   
    30.     <form id="form1" runat="server">   
    31.         <div>   
    32.             <CE:Editor ID="editor1" runat="server">   
    33.             </CE:Editor>   
    34.         </div>   
    35.     </form>   
    36. </body>   
    37. </html>  
    Regards,
     
    ken
View as RSS news feed in XML